import logging,yagmail

def log_cat():
    logging.basicConfig(filename='a3mall.log',filemode='w',level=logging.DEBUG,format="%(message)s->%(asctime)s->%(levelname)s")

def send_mail(filename):
    mail=yagmail.SMTP(user="3177622011@qq.com",password="tmafvuztgjqvdgeb",host="smtp.qq.com")
    mail.send(to="3177622011@qq.com",subject="今日主题",contents="报告",attachments=filename)